ia.GradientLegend Class
A class for rendering a gradient legend.
Constructor
ia.GradientLegend
-
id
Parameters:
-
idStringThe id of the the legend.
Item Index
Methods
Properties
Methods
_build
-
cw -
ch
Builds the legend.
Parameters:
-
cwNumberThe width.
-
chNumberThe height.
_highlightBlock
-
value
Highlights the block legend
Parameters:
-
valueNumberThe value of the item.
_highlightPoint
-
value
Highlights the point legend.
Parameters:
-
valueNumberThe value of the item.
_renderBlock
()
private
Renders the block legend.
_renderPoint
()
private
Renders the point legend.
addEventListener
-
eventType -
fnc -
obj
Add an event listener.
Parameters:
-
eventTypeStringThe type of event to listen for.
-
fncFunctionThe function to call when the event occurs.
-
objObjectAn optional parent object.
clearHighlight
()
Clears all highlights.
clearSelection
()
Clears all selections.
dispatchEvent
-
event
Dispatch an event to the listeners.
Parameters:
-
eventObjectThe event object.
hide
()
Hides the legend.
highlight
-
id
Highlights the legend.
Parameters:
-
idStringThe id of the item.
removeListener
-
obj
Removes all event listeners for the given object.
Parameters:
-
objObjectThe object.
render
()
Renders the legend.
select
-
id
Selects.
Parameters:
-
idStringThe id of the item.
show
()
Shows the legend.
unselect
-
id
Unselects.
Parameters:
-
idStringThe id of the item.
Properties
container
JQUERY Element
The container that holds the object.
highlightColor
String
The item highlight color.
id
String
The id.
style
Object
The style.
Default: {fillStyle:'#EFEFEF', strokeStyle:'#cccccc', lineWidth:'0.5', lineJoin:'miter'}